package com.example.demo01.service;

import com.example.demo01.mapper.RecordMapper;
import com.example.demo01.pojo.FormInfo;
import com.example.demo01.pojo.Record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class RecordService {
    @Autowired
    private RecordMapper recordMapper;

    //增加一条打卡记录
    public void addRecord(Record record){
        recordMapper.addRecord(record);
    }


    //查询某一天的所有打卡记录
    public List<Record> getRecordByTime(String time){

        return recordMapper.getRecordByTime(time);
    }


    //查询某个人的所有打卡记录
    public List<Record> getRecordByUsername(String username){
        return recordMapper.getRecordByUsername(username);
    }


    public Record getRecordByUsernameAndTime(String username, String date){
        return recordMapper.getRecordByUsernameAndTime(username, date);
    }



    //某天身体不适名单




}
